package common.model.converter;

import common.model.dto.UserCacheInfo;
import common.model.po.SysUser;

/**
 * 描述
 *
 * @author 米泽鹏
 * @since 2023-4-14 下午 3:36
 */
public class CacheInfoConverter {

	public static UserCacheInfo userPoToUserValidCacheInfo(SysUser sysUser) {
		if (sysUser == null) {
			return null;
		}
		UserCacheInfo userCacheInfo = new UserCacheInfo();
		userCacheInfo.setUserId(sysUser.getId());
		userCacheInfo.setUsername(sysUser.getUsername());
		userCacheInfo.setNickname(sysUser.getNickname());
		userCacheInfo.setValid(sysUser.getValid());
		return userCacheInfo;
	}

}
